/* Sentinel - IRC Statistical and Operator Services
** myusers.c - Functions to track logged in users
**
** Copyright W. Campbell and others.  See README for more details
** Some code Copyright: Jonathan George, Kai Seidler, ircd-hybrid Team,
**                      IRCnet IRCD developers.
**
** $Id: myusers.c 7 2010-02-01 19:17:42Z dubkat $
*/

#include "stats.h"
#include "struct.h"
#include "proto.h"
#include "match.h"

dlink_list myuhead;
dlink_list myudying;

/* Only looks in the active list, not the dying list */
struct MyUser *findmyuser(char *nick)
{
  struct MyUser *myu;
  dlink_node *dl;

  DLINK_FOREACH(dl, myuhead.head)
  {
    myu = (struct MyUser *) dl->data;
    if (!irccasecmp(nick, myu->username))
      return myu;
  }
  return NULL;
}
